<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=utf-8" />
    <title>
      6.22.&nbsp;Acl-2.2.52
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body class="lfs" id="lfs-8.0">
    <div class="navheader">
      <h4>
        Linux From Scratch - Version 8.0
      </h4>
      <h3>
        第六章&nbsp;安装基本系统软件
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="attr.html" title="Attr-2.4.47">上一页</a>
          <p>
            Attr-2.4.47
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="libcap.html" title="Libcap-2.25">下一页</a>
          <p>
            Libcap-2.25
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter06.html" title=
          "第六章&nbsp;安装基本系统软件">返回</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 8.0 ">主页</a>
        </li>
      </ul>
    </div>
    <div class="wrap" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="ch-system-acl" name="ch-system-acl"></a>6.22. Acl-2.2.52
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <p>
          Acl 软件包包含了管理访问控制列表的实用程序，用于为文件和目录定义更细粒度的自主访问权限
        </p>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">预计构建时间:</strong>
              <span class="segbody">少于 0.1 SBU</span>
            </div>
            <div class="seg">
              <strong class="segtitle">所需磁盘空间:</strong>
              <span class="segbody">4.8 MB</span>
            </div>
          </div>
        </div>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          6.22.1. 安装 Acl
        </h2>
        <p>
          修改文档目录使其成为一个版本化的目录:
        </p>
        <pre class="userinput">
<kbd class=
"command">sed -i -e 's|/@pkg_name@|&amp;-@pkg_version@|' include/builddefs.in</kbd>
</pre>
        <p>
          修正一些中断的测试:
        </p>
        <pre class="userinput">
<kbd class=
"command">sed -i "s:| sed.*::g" test/{sbits-restore,cp,misc}.test</kbd>
</pre>
        <p>
          此外，修正在使用<span class=
          "command"><strong>getfacl -e</strong></span>时，因过长组名导致段错误的缺陷:
        </p>
        <pre class="userinput">
<kbd class=
"command">sed -i -e "/TABS-1;/a if (x &gt; (TABS-1)) x = (TABS-1);" \
    libacl/__acl_to_any_text.c</kbd>
</pre>
        <p>
          准备编译 Acl 软件包:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr    \
            --bindir=/bin    \
            --disable-static \
            --libexecdir=/usr/lib</kbd>
</pre>
        <p>
          编译该软件包:
        </p>
        <pre class="userinput">
<kbd class="command">make</kbd>
</pre>
        <p>
          Acl 测试需要运行在支持访问控制的文件系统之上，并且要在具备 Acl 库的<span class="application">Coreutils</span>软件包 被构建之后。如果需要，在<span class=
          "application">Coreutils</span> 被构建之后（本章后文介绍）再运行<span class="command"><strong>make -j1
          tests</strong></span> .
        </p>
        <p>
          安装该软件包:
        </p>
        <pre class="userinput">
<kbd class="command">make install install-dev install-lib
chmod -v 755 /usr/lib/libacl.so</kbd>
</pre>
        <p>
          该共享库需要被移动到 <code class=
          "filename">/lib</code>, 并且需要在 <code class=
          "filename">/usr/lib</code> 目录下生成<code class=
          "filename">.so</code> 文件:
        </p>
        <pre class="userinput">
<kbd class="command">mv -v /usr/lib/libacl.so.* /lib
ln -sfv ../../lib/$(readlink /usr/lib/libacl.so) /usr/lib/libacl.so</kbd>
</pre>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          <a id="contents-acl" name="contents-acl"></a>6.22.2. Acl 的内容
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">安装的程序:</strong>
              <span class="segbody">chacl, getfacl, and setacl</span>
            </div>
            <div class="seg">
              <strong class="segtitle">安装的库:</strong>
              <span class="segbody">libacl.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">安装的目录:</strong>
              <span class="segbody">/usr/include/acl and
              /usr/share/doc/acl-2.2.52</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            简要描述
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="chacl" name="chacl"></a><span class=
                    "term"><span class=
                    "command"><strong>chacl</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    更改一个文件或者目录的访问控制列表
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="getfacl" name="getfacl"></a><span class=
                    "term"><span class=
                    "command"><strong>getfacl</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    获取文件的访问控制列表
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="setacl" name="setacl"></a><span class=
                    "term"><span class=
                    "command"><strong>setacl</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    设置文件的访问控制列表
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libacl" name="libacl"></a><span class=
                    "term"><code class="filename">libacl</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    包含用于操作访问控制列表的库函数
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="attr.html" title="Attr-2.4.47">上一页</a>
          <p>
            Attr-2.4.47
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="libcap.html" title="Libcap-2.25">下一页</a>
          <p>
            Libcap-2.25
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter06.html" title=
          "第六章&nbsp;安装基本系统软件">返回</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 8.0 ">主页</a>
        </li>
      </ul>
    </div>
  </body>
</html>
